﻿<Window x:Class="Noc.Pomodoro.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:localControls="clr-namespace:Noc.Pomodoro.Controls"
        Title="MainWindow"
        Height="350"
        Width="525"
        UseLayoutRounding="True" Icon="/Pomodoro;component/Properties/ApplicationIcon.ico">

  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Styles/ApplicationStyles.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Window.Resources>

  <Window.TaskbarItemInfo>
    <TaskbarItemInfo x:Name="taskbarInfo" ProgressState="None" ProgressValue="{Binding Progress, ElementName=timer}">
      <TaskbarItemInfo.ThumbButtonInfos>
        <ThumbButtonInfoCollection>
          <ThumbButtonInfo Description="Internal Interruption" ImageSource="/Pomodoro;component/Resources/Action-InternalInterrupt.png" />
          <ThumbButtonInfo Description="External Interruption" ImageSource="/Pomodoro;component/Resources/Action-ExternalInterrupt.png" />
          <ThumbButtonInfo Description="Abort Pomodoro" ImageSource="/Pomodoro;component/Resources/Action-Void.png" />
        </ThumbButtonInfoCollection>
      </TaskbarItemInfo.ThumbButtonInfos>
    </TaskbarItemInfo>
  </Window.TaskbarItemInfo>

  <DockPanel>

    <Grid DockPanel.Dock="Top">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>

      <localControls:PomodoroCalendarControl Grid.Column="0" SelectedDate="{Binding Date, Mode=TwoWay}" />

      <StackPanel Orientation="Horizontal" Grid.Column="1" VerticalAlignment="Stretch">
        <Button Width="21">
          <Button.Content>
            <Image Source="/Pomodoro;component/Resources/Action-Refresh.png" Height="12" Width="12" />
          </Button.Content>
        </Button>
        <Button Width="21">
          <Button.Content>
            <Image Source="/Pomodoro;component/Resources/Action-Configure.png" Height="12" Width="12" />
          </Button.Content>
        </Button>
      </StackPanel>

    </Grid>

    <Grid DockPanel.Dock="Top" Height="100">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="100" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>

      <localControls:PomodoroTimer Grid.Column="0" x:Name="timer" Finished="OnTimerFinished" />
      <localControls:AnalogClockControl Grid.Column="0" Time="{Binding Time, ElementName=timer}" Height="100" />
      <localControls:DigitalClockControl Grid.Column="1" Time="{Binding Time, ElementName=timer}" Height="100" />

    </Grid>

    <StatusBar DockPanel.Dock="Bottom">
      <StatusBar.Items>
        <StatusBarItem>
          <TextBlock Text="Ready." />
        </StatusBarItem>
      </StatusBar.Items>
    </StatusBar>

    <localControls:TaskGridControl
        Tasks="{Binding Items}"
        IsToday="{Binding IsToday}"
        TaskOperation="OnTaskOperation"  />

  </DockPanel>
</Window>